{% extends "admin/base_site.html" %}
{% block title %}Requirements management{% endblock %}


{% block branding %}
<h1 id="site-name">DjReq</h1>
{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs"><a href=/>home</a> | <a href=/admin>admin</a>
{% if node.parent %} | <a href=../{{ node.parent.pk }}/>parent</a>{% endif %}
</div>
{% endblock %}


{% block content %}
<h1>Module {{ node.title }}</h1>
views: {% for view in node.view_set.all %}<a href=view/{{ view.pk }}/>{{ view.title }}</a> |{% endfor %}
<br>
<a href=new/view/>new view</a> | <a href=new/doc/>import document</a>
<table border=2>
<tr>
{% for h in view.header_list %}<th>{{ h.title }}</th>{% endfor %}
</tr>

{% for item in node.view_items %}
<tr>{% for a in item.attrs %}<td>{{ a.html|linebreaks }}</td>{% endfor %}</tr>
{% endfor %}

</table>

<h2>About this page</h2>
<pre>
- The current node is a module; a module contains items
- an item has attributes
- attributes visibility is managed by views in a module

TODO
- admin column headers, views
</pre>
{% endblock %}
